package dao;

import java.util.HashMap;

/**
 * Interface FilterDao
 * 
 * Class using this interface must implement the methods in this interface. This
 * class contains methods to perform dao operations related to filters table in the database
 * @author Sukhjinder K. Naurla
 * @since June 2013
 * @version $Revision: 1.0 $
 */
public interface FilterDao {

	/**
     * Creates a new filter entry and returns the ID
     * @param properties 
    
     * @return int
	 * @throws DaoException
	 * @throws ModelException  */
    public int create(HashMap<String, String> properties) throws DaoException;
    
    /**
     * Loads a filter row for given ID
    
    
    
     * @param Id int
     * @return HashMap<String,String>
     * @throws DaoException
     * @throws ModelException  */
    public HashMap<String, String> load(int Id) throws DaoException;
    
    /**
     * Updates an filter row
     * @param properties
    
     * @throws DaoException
     * @throws ModelException  */
    public void update(HashMap<String, String> properties) throws DaoException;
    
    /**
	 * Deletes an filter row, given the id
	
	
	 * @param Id int
     * @throws DaoException
     * @throws ModelException  */
	public void delete(int Id) throws DaoException;
	
	/**
	 * Given the userId, returns all the filters
	 * @param userId
	
	
	 * @return HashMap * @throws DaoException */
	public HashMap<Integer, String[]> findByUserId(int userId) throws DaoException;
		
}
